package com.example.myapplication

import android.content.Context
import android.content.Intent
import com.alibaba.android.arouter.facade.annotation.Route
import com.ftw.commons.BaseActivity
import com.ftw.commons.provider.AroutePath
import com.ftw.commons.utils.StatusBarUtils


/**
 * 描    述：
 * 作    者：fangtianwen
 * 时    间：2019/4/16
 */

@Route(path = AroutePath.HOME_PAGE_ACTIVITY)
class LoginActivity : BaseActivity() {

    override fun initView() {
        StatusBarUtils.setStatusBarColor(this@LoginActivity)
        loadFragment(LoginFragment(), false)
    }

    override fun getViewId(): Int {
        return 0
    }

    companion object {
        fun startForResult(context: Context) {
            val intent = Intent(context, LoginActivity::class.java)
            intent.addFlags(
                Intent.FLAG_ACTIVITY_CLEAR_TASK or
                        Intent.FLAG_ACTIVITY_NEW_TASK
            )
            context.startActivity(intent)
        }
    }

}